<?php
	
class Table_APourAgence extends Zend_Db_Table_Abstract
{
    protected $_name    = 'apouragence';
    protected $_primary = array ('VIP_NUMERO','AGENCE_NUMERO');
    protected $_sequence = FALSE;
 	
	public function insertAPourAgence($numAgence, $numVip){
                $data = array('AGENCE_NUMERO' => $numAgence, 'VIP_NUMERO'=> $numVip);
                $this->insert($data);
    }
	  
 	public function getNumeroAgence($idVip){
		return $this->fetchRow($this
			->select('AGENCE_NOM')
			->where('VIP_NUMERO= ?', $idVip));
	}
	
	public function supprAPourAgence($id){
		$this->delete('VIP_NUMERO ='.(int)$id);
	}
	
}